<?php

class staticComponents extends sfComponents {

  public function executeSidebar(sfWebRequest $request) {
    $feed1 = new Feed(sfConfig::get('app_feed_url1'));
    $feed2 = new Feed(sfConfig::get('app_feed_url2'));
    $feed1Count = ceil(sfConfig::get('app_feed_topic_count')/2);
    $feed1List = $feed1->find($feed1Count);
    $feed2List = $feed2->find((sfConfig::get('app_feed_topic_count')-$feed1Count));
    $feedList = array_merge($feed1List, $feed2List);
    shuffle($feedList);
    $this->feedList = $feedList;
  }

}